import {
	defineStore
} from 'pinia';
const user_info = {
	balance: 0.00,
	head_portrait: "",
	id: "",
	phone: "",
	address: "",
	invitation_code: ""
};
const useUserStore = defineStore('user', {
	state: () => ({
		user_info: uni.getStorageSync('user_info') || user_info
	}),
	actions: {
		changeUserInfo(value) {
			this.user_info = value;
			uni.setStorageSync('user_info', value)
		}
	}
});

export default useUserStore;